/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.sna.view;

import br.com.sna.control.PrestadorActionControl;
import br.com.sna.controller.implement.PrestadorImplements;
import br.com.sna.model.Prestador;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author ritacosta
 */
public class PrestadorFrm extends javax.swing.JFrame {

    /**
     * Creates new form Prestador
     */
    private PrestadorActionControl prestadorActionControl;
    private DefaultTableModel tmPrestador = new DefaultTableModel(null, new String[]{"Id", "Nome", "CNES"});
    private List<Prestador> prestadores;
    PrestadorImplements prestadorImplements;
    private ListSelectionModel lsmPrestador;

    public PrestadorFrm() {
        initComponents();
        prestadorImplements = new PrestadorImplements();
        prestadorActionControl = new PrestadorActionControl(this);
        
    }

    private void searchPrestadores() {
        prestadores = prestadorImplements.listaPrestador();
        mostrarPrestadores(prestadores);
    }

    private void mostrarPrestadores(List<Prestador> prestadores) {
        while (tmPrestador.getRowCount() < 0) {
            tmPrestador.removeRow(0);
        }
        if (prestadores.size() == 0) {
            JOptionPane.showMessageDialog(null, "Não foi encontrado nenhum registro!");
        } else {
            String[] campos = new String[]{null, null, null};
            for (int i = 0; i < prestadores.size(); i++) {
                tmPrestador.addRow(campos);
                tmPrestador.setValueAt(prestadores.get(i).getId(), i, 0);
                tmPrestador.setValueAt(prestadores.get(i).getNome(), i, 1);
                tmPrestador.setValueAt(prestadores.get(i).getCnes(), i, 2);
            }
        }
    }
    
    private void tbPrestadorLinhaSelecionada(JTable tb) {
        if (tb.getSelectedRow() != -1) {
            labelId.setText(String.valueOf(prestadores.get(tb.getSelectedRow()).getId()));
            txtNomePrestador.setText(prestadores.get(tb.getSelectedRow()).getNome());
            ftxtCnes.setText(String.valueOf(prestadores.get(tb.getSelectedRow()).getCnes()));
        } else {
            labelId.setText("");
            txtNomePrestador.setText("");
            ftxtCnes.setText("");
        }
    }
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTextField1 = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        Funcionário = new javax.swing.JLabel();
        jToolBar1 = new javax.swing.JToolBar();
        btIncluirPrestador = new javax.swing.JButton();
        btPrepararAlterarPrestador = new javax.swing.JButton();
        btExcluirPrestador = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        btSalvarPrestador = new javax.swing.JButton();
        btAlterarPrestador = new javax.swing.JButton();
        btFinalizarPrestador = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        labelId = new javax.swing.JLabel();
        txtNomePrestador = new javax.swing.JTextField();
        ftxtCnes = new javax.swing.JFormattedTextField();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbPrestador = new javax.swing.JTable();
        jToolBar2 = new javax.swing.JToolBar();
        btPesquisarPrestador = new javax.swing.JButton();
        btLimpar = new javax.swing.JButton();

        jTextField1.setText("jTextField1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Prestador");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        Funcionário.setFont(new java.awt.Font("Calibri", 0, 24)); // NOI18N
        Funcionário.setText("Prestador");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Funcionário, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Funcionário)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jToolBar1.setRollover(true);

        btIncluirPrestador.setText("Incluir");
        btIncluirPrestador.setFocusable(false);
        btIncluirPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btIncluirPrestador.setMaximumSize(new java.awt.Dimension(60, 35));
        btIncluirPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btIncluirPrestador);

        btPrepararAlterarPrestador.setText("Modificar");
        btPrepararAlterarPrestador.setFocusable(false);
        btPrepararAlterarPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPrepararAlterarPrestador.setMaximumSize(new java.awt.Dimension(60, 35));
        btPrepararAlterarPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btPrepararAlterarPrestador);

        btExcluirPrestador.setText("Excluir");
        btExcluirPrestador.setFocusable(false);
        btExcluirPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btExcluirPrestador.setMaximumSize(new java.awt.Dimension(60, 35));
        btExcluirPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btExcluirPrestador);
        jToolBar1.add(jSeparator1);

        btSalvarPrestador.setText("Salvar");
        btSalvarPrestador.setEnabled(false);
        btSalvarPrestador.setFocusable(false);
        btSalvarPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btSalvarPrestador.setMaximumSize(new java.awt.Dimension(60, 35));
        btSalvarPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btSalvarPrestador);

        btAlterarPrestador.setText("Alterar");
        btAlterarPrestador.setEnabled(false);
        btAlterarPrestador.setFocusable(false);
        btAlterarPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btAlterarPrestador.setMaximumSize(new java.awt.Dimension(60, 35));
        btAlterarPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btAlterarPrestador);

        btFinalizarPrestador.setText("Finalizar");
        btFinalizarPrestador.setEnabled(false);
        btFinalizarPrestador.setFocusable(false);
        btFinalizarPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btFinalizarPrestador.setMaximumSize(new java.awt.Dimension(60, 35));
        btFinalizarPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btFinalizarPrestador);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Insira dados para cadastro"));

        jLabel3.setText("Nome:");

        jLabel4.setText("Cnes:");

        jLabel2.setText("Id:");

        txtNomePrestador.setEnabled(false);

        ftxtCnes.setEnabled(false);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNomePrestador)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(labelId, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 120, Short.MAX_VALUE))
                    .addComponent(ftxtCnes))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel2)
                    .addComponent(labelId, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNomePrestador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(ftxtCnes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        tbPrestador.setModel(tmPrestador);
        tbPrestador.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmPrestador = tbPrestador.getSelectionModel();
        lsmPrestador.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if(! e.getValueIsAdjusting()){
                    tbPrestadorLinhaSelecionada(tbPrestador);
                }
            }
        });
        jScrollPane1.setViewportView(tbPrestador);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(135, 135, 135))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(283, 283, 283))
        );

        jToolBar2.setRollover(true);

        btPesquisarPrestador.setText("Listar Prestadores");
        btPesquisarPrestador.setFocusable(false);
        btPesquisarPrestador.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPesquisarPrestador.setMaximumSize(new java.awt.Dimension(120, 35));
        btPesquisarPrestador.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btPesquisarPrestador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btPesquisarPrestadorActionPerformed(evt);
            }
        });
        jToolBar2.add(btPesquisarPrestador);

        btLimpar.setText("Limpar");
        btLimpar.setFocusable(false);
        btLimpar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btLimpar.setMaximumSize(new java.awt.Dimension(120, 35));
        btLimpar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar2.add(btLimpar);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(14, 14, 14))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btPesquisarPrestadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPesquisarPrestadorActionPerformed
        searchPrestadores();
    }//GEN-LAST:event_btPesquisarPrestadorActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PrestadorFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PrestadorFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PrestadorFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PrestadorFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PrestadorFrm().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Funcionário;
    private javax.swing.JButton btAlterarPrestador;
    private javax.swing.JButton btExcluirPrestador;
    private javax.swing.JButton btFinalizarPrestador;
    private javax.swing.JButton btIncluirPrestador;
    private javax.swing.JButton btLimpar;
    private javax.swing.JButton btPesquisarPrestador;
    private javax.swing.JButton btPrepararAlterarPrestador;
    private javax.swing.JButton btSalvarPrestador;
    private javax.swing.JFormattedTextField ftxtCnes;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar2;
    private javax.swing.JLabel labelId;
    private javax.swing.JTable tbPrestador;
    private javax.swing.JTextField txtNomePrestador;
    // End of variables declaration//GEN-END:variables

    public DefaultTableModel getTmPrestador() {
        return tmPrestador;
    }

    public void setTmPrestador(DefaultTableModel tmPrestador) {
        this.tmPrestador = tmPrestador;
    }

    public List<Prestador> getPrestadores() {
        return prestadores;
    }

    public void setPrestadores(List<Prestador> prestadores) {
        this.prestadores = prestadores;
    }

    public ListSelectionModel getLsmPrestador() {
        return lsmPrestador;
    }

    public void setLsmPrestador(ListSelectionModel lsmPrestador) {
        this.lsmPrestador = lsmPrestador;
    }

    public javax.swing.JTable getTbPrestador() {
        return tbPrestador;
    }

    public void setTbPrestador(javax.swing.JTable tbPrestador) {
        this.tbPrestador = tbPrestador;
    }

    public javax.swing.JButton getBtAlterarPrestador() {
        return btAlterarPrestador;
    }

    public void setBtAlterarPrestador(javax.swing.JButton btAlterarPrestador) {
        this.btAlterarPrestador = btAlterarPrestador;
    }

    public javax.swing.JButton getBtExcluirPrestador() {
        return btExcluirPrestador;
    }

    public void setBtExcluirPrestador(javax.swing.JButton btExcluirPrestador) {
        this.btExcluirPrestador = btExcluirPrestador;
    }

    public javax.swing.JButton getBtFinalizarPrestador() {
        return btFinalizarPrestador;
    }

    public void setBtFinalizarPrestador(javax.swing.JButton btFinalizarPrestador) {
        this.btFinalizarPrestador = btFinalizarPrestador;
    }

    public javax.swing.JButton getBtIncluirPrestador() {
        return btIncluirPrestador;
    }

    public void setBtIncluirPrestador(javax.swing.JButton btIncluirPrestador) {
        this.btIncluirPrestador = btIncluirPrestador;
    }

    public javax.swing.JButton getBtLimpar() {
        return btLimpar;
    }

    public void setBtLimpar(javax.swing.JButton btLimpar) {
        this.btLimpar = btLimpar;
    }

    public javax.swing.JButton getBtPesquisarPrestador() {
        return btPesquisarPrestador;
    }

    public void setBtPesquisarPrestador(javax.swing.JButton btPesquisarPrestador) {
        this.btPesquisarPrestador = btPesquisarPrestador;
    }

    public javax.swing.JButton getBtPrepararAlterarPrestador() {
        return btPrepararAlterarPrestador;
    }

    public void setBtPrepararAlterarPrestador(javax.swing.JButton btPrepararAlterarPrestador) {
        this.btPrepararAlterarPrestador = btPrepararAlterarPrestador;
    }

    public javax.swing.JButton getBtSalvarPrestador() {
        return btSalvarPrestador;
    }

    public void setBtSalvarPrestador(javax.swing.JButton btSalvarPrestador) {
        this.btSalvarPrestador = btSalvarPrestador;
    }

    public javax.swing.JFormattedTextField getFtxtCnes() {
        return ftxtCnes;
    }

    public void setFtxtCnes(javax.swing.JFormattedTextField ftxtCnes) {
        this.ftxtCnes = ftxtCnes;
    }

    public javax.swing.JLabel getLabelId() {
        return labelId;
    }

    public void setLabelId(javax.swing.JLabel labelId) {
        this.labelId = labelId;
    }

    public javax.swing.JTextField getTxtNomePrestador() {
        return txtNomePrestador;
    }

    public void setTxtNomePrestador(javax.swing.JTextField txtNomePrestador) {
        this.txtNomePrestador = txtNomePrestador;
    }

    
    
    
}
